let
  homepage.root = "/system/data/homepage";
  public = {
    alias = "/system/data/pub/";
    extraConfig = ''
      fancyindex on;
      fancyindex_exact_size on;
      directio 4M;
    '';
  };
  ygg = {
    domain = "badbayan.ygg";
    listen = [
      { addr = "[204:7039:ade1:9854:d9a7:3f43:3996:b4cc]"; }
      { addr = "[304:7039:ade1:9854::bad]"; }
    ];
  };
in {
  services.nginx.virtualHosts.${ygg.domain} = {
    inherit (ygg) listen;
    addSSL = false;
    locations."/" = homepage;
    locations."/pub/" = public;
  };
}
